<h2>Problems</h2>
<table cellpadding="0" cellspacing="0" border="0" style="margin:20px;"><tr>
	<td style="vertical-align:top;"><div style="text-align:right;" class="info"><b>Page:</b></div></td>
	<td><div class="pagination">
		<ul>
<?php 
for($i = 1; file_exists(get_list_path($i)); $i++){
	echo '<li>';
	if($i != $list_page_num) echo '<li><a href="index.php?section=problems&amp;page=' . $i . '">' . $i . '</a></li>';
	else echo '<li class="currentpage">' . $i . '</li>';
}
?>
		</ul>
	</div></td>
</tr></table>

<table cellpadding="3" cellspacing="1" border="0" class="bg_table" width="100%">
	<tr><th class="bg_table"><div style="text-align:center;width:40px;"><b>ID</b></div></th><th class="bg_table"><div style="text-align:left;"><b>Description / Title</b></div></th></tr>
<?php
$list_file = fopen(get_list_path($list_page_num), "rb");
while(!feof($list_file)){
	$line = preg_split('/\t/', fgets($list_file));
	$line[0] = preg_replace('/ /', '', $line[0]);
	if(sizeof($line) == 2)
	echo '<tr class="bg_table_row' . ($line[0] % 2 + 1) . '"><td style="height:40px;"><div style="text-align:center;"><b>' . $line[0] . '</b></div></td><td><div><a href="index.php?section=problems&amp;id=' . $line[0] . '" style="text-decoration:none;" title="Click to view problem">'. $line[1] . '</a></div></td></tr>';
}
fclose($list_file);
?>
</table>

<table cellpadding="0" cellspacing="0" border="0" style="margin:20px;">
	<tr><td style="vertical-align:top;"><div style="text-align:right;" class="info"><b>Page:</b></div></td>
	<td><div class="pagination">
		<ul>
<?php 
for($i = 1; file_exists(get_list_path($i)); $i++){
	echo '<li>';
	if($i != $list_page_num) echo '<li><a href="index.php?section=problems&amp;page=' . $i . '">' . $i . '</a></li>';
	else echo '<li class="currentpage">' . $i . '</li>';
}
?>
		</ul>
	</div></td>
</tr></table>

